package com.zjy.dao;

import com.zjy.bean.Article;
import com.zjy.dto.ArticleCondition;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@Repository
public interface ArticleMapper extends Mapper<Article> {
    int deleteArticleById(String articleId);

    Article selectArticleById(String articleId);

    List<Article> selectAllArticle();

    List<Article> selectArticleByCondition(ArticleCondition articleCondition);

    int getArticleCount(ArticleCondition articleCondition);

    int updateCollectionNum(@Param("articleId") String articleId, @Param("count") int count);

    List<Article> selectArticleList(@Param("begin") String begin, @Param("now") String now);

    Article selectArticleByCommentId(String commentId);
}